<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<!-- 引入核心标签库 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>留言板</title>
</head>
<body bgcolor="#82CA9C">
	<h1 align="center">查看所有留言</h1>
	<label style="margin-left: 35%; font-size: 17px">欢迎您：${USERNAME_IN_SESSION}</lable>
		<a href='${pageContext.request.contextPath}/lostfound?cmd=quit'
		style="font-size: 15px; margin-left: 7%">安全退出</a>
		<a href="${pageContext.request.contextPath}/lostfound"
		 style="margin-left: 6%">返回</a>
		<table align="center" border="1" cellpadding="5px" cellspacing="0">
			<thead>
				<tr bgcolor="#3CB371" align="center">
					<th>编号</th>
					<th>ID</th>
					<th>留言人</th>
					<th>邮箱地址</th>
					<th>电话号码</th>
					<th>物品名称</th>
					<th>其他信息</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<tr bgcolor="#ADD8E6" align="center">
					<c:if test="${list==null}">
						<td colspan="9">对不起，暂时没有留言信息！</td>
					</c:if>
				</tr>
				<c:forEach items="${list}" var="msg" varStatus="vs">
					<tr align="center" bgcolor='${vs.count%2==0?"#ADD8E6":"#90EE90"}'>
						<td>${vs.count}</td>
						<td>${msg.id}</td>
						<td>${msg.name}</td>
						<td>${msg.email}</td>
						<td>${msg.phone}</td>
						<td>${msg.lostName}</td>
						<td>${msg.other}</td>
						<td>
							<!-- JavaScript代码，返回true执行点击，false不执行点击事件 --> <a
							onclick="return confirm('确认删除？删除后无法恢复！')"
							href='${pageContext.request.contextPath}/lostfound?cmd=delete&flag=msg&id=${msg.id}'>删除</a>
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
</body>
</html>




